package com.stlm2.dems.entity;

/**
 * Created by apple on 2017/10/20.
 */
public enum EntranceType {
    Type1(1) {
        public String toString() {
            return "版块1";
        }
    },
    Type2(2) {
        public String toString() {
            return "版块2";
        }
    },
    Type3(3) {
        public String toString() {
            return "秒杀版块";
        }
    };


    private final int val;

    EntranceType(int n) {
        val = n;
    }

    public int getIntValue() {
        return val;
    }

    public static EntranceType getByIntValue(int n) {
        switch (n) {
            case 1:
                return Type1;
            case 2:
                return Type2;
            case 3:
                return Type3;
            default:
                return null;
        }
    }
}
